cmake_minimum_required(VERSION 3.16)
project("plugin_add")

#SET(CMAKE_VERBOSE_MAKEFILE on)
#options, these can be pass in by cmake argument
option(USE_CXX11_ABI "USE_CXX11_ABI" OFF)

if(USE_CXX11_ABI)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=1")
else()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
endif()

include_directories(
    $ENV{ATB_HOME_PATH}/include
    $ENV{ASCEND_HOME_PATH}/include
    ${CMAKE_CURRENT_SOURCE_DIR})

link_directories(
    $ENV{ATB_HOME_PATH}/lib
    $ENV{ASCEND_HOME_PATH}/lib64
    ${CMAKE_SOURCE_DIR}/kernel/libs
    )

add_library(plugin_add SHARED chatglm6b_add_operation.cpp)

target_link_libraries(plugin_add PRIVATE atb ascendcl ascendc_kernels c_sec)



